package com.ruoyi.framework.web.service;

import org.springframework.security.authentication.AbstractAuthenticationToken;
import javax.security.auth.Subject;

public class WxAuthenticationToken extends AbstractAuthenticationToken {

    private final String code;

    public WxAuthenticationToken(String code) {
        super(null);
        this.code = code;
    }

    @Override
    public Object getCredentials() {
        return null;
    }

    @Override
    public Object getPrincipal() {
        return getCode();
    }

    @Override
    public boolean implies(Subject subject) {
        return super.implies(subject);
    }

    public String getCode() {
        return code;
    }
}
